{-# LANGUAGE DeriveGeneric #-}

module Game.Dusk.Tarot.Minor where

import Data.Hashable
import Data.Text.Prettyprint.Doc
import GHC.Generics
import Generic.Data

data Suit
  = Swords
  | Pentacles
  | Cups
  | Wands
  deriving (Eq, Enum, Bounded, Generic)

instance Pretty Suit where
  {-# INLINE pretty #-}
  pretty = pretty . gconName

instance Hashable Suit

data Value
  = Two
  | Three
  | Four
  | Five
  | Six
  | Seven
  | Eight
  | Nine
  | Ten
  | Page
  | Knight
  | Queen
  | King
  | Ace
  deriving (Eq, Enum, Bounded, Generic)

instance Hashable Value

instance Pretty Value where
  {-# INLINE pretty #-}
  pretty Two = pretty "2"
  pretty Three = pretty "3"
  pretty Four = pretty "4"
  pretty Five = pretty "5"
  pretty Six = pretty "6"
  pretty Seven = pretty "7"
  pretty Eight = pretty "8"
  pretty Nine = pretty "9"
  pretty Ten = pretty "10"
  pretty Page = pretty "Page"
  pretty Knight = pretty "Knight"
  pretty Queen = pretty "Queen"
  pretty King = pretty "King"
  pretty Ace = pretty "Ace"
